#ifndef CONSTANT_BUFFER_H
#define CONSTANT_BUFFER_H

#include "Buffer.h"

namespace devii
{

class ConstantBuffer : public Buffer
{
public:
	ConstantBuffer(ID3D11Device* device, ID3D11DeviceContext* context);
	~ConstantBuffer();

	bool init(const unsigned int size, const unsigned int offset);
	
	// TODO unmap and map
	HRESULT map(const unsigned int sub_resource, D3D11_MAP map, D3D11_MAPPED_SUBRESOURCE* resource);
	void unmap(const unsigned int sub_resource);

	ID3D11Buffer* getBuffer() const;

private:
	ID3D11Buffer* constant_buffer;
};

}
#endif